import 'package:flutter/material.dart';
import 'package:myapp/globle/route_manager.dart';
import 'package:myapp/ui/spash_page.dart';
import 'package:myapp/util/colors_utils.dart';
import 'package:oktoast/oktoast.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  static GlobalKey<NavigatorState> navigatorState = new GlobalKey();

  @override
  Widget build(BuildContext context) {
    return OKToast(
      position: ToastPosition.bottom,
      child: MaterialApp(
        title: 'Flutter Demo',
        navigatorKey: navigatorState,
        debugShowCheckedModeBanner: false,
        // routes: {RouteName.SEARCH_PAGE: (context) => SearchPage()},
        onGenerateRoute: (settings) => generateInitialRoutes(settings),
        theme: ThemeData(
            primaryColor: ColorUtils.color_primary,
            bottomNavigationBarTheme: BottomNavigationBarThemeData(
              selectedItemColor: ColorUtils.color_text_1,
              unselectedItemColor: ColorUtils.color_text_3,
              type: BottomNavigationBarType.fixed,
            ),
            tabBarTheme: TabBarTheme(
                labelColor: ColorUtils.color_text_1,
                unselectedLabelColor: ColorUtils.color_text_3),
            textTheme: TextTheme(
              bodyText1: TextStyle(
                color: ColorUtils.color_text_2,
                fontSize: 14,
              ),
              // subtitle1: TextStyle(textBaseline: TextBaseline.alphabetic),
            )),
        home: SplashPage(),
      ),
    );
  }
}
